Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use triedb config for reference root #1366

Merged
merged 5 commits into from
Oct 18, 2024
Merged

use triedb config for reference root #1366

merged 5 commits into from
Oct 18, 2024

Conversation

darioush
Copy link
Collaborator

@darioush darioush commented Oct 16, 2024

Why this should be merged

This provides better alignment with upstream code, avoiding passing an extra boolean to statedb.Commit and avoids an additional triedb backend method.
Still considering whether we can avoid the concurrent use of the triedb ref. counting entirely

How this works

Removes UpdateAndReferenceRoot in favor of a triedb backend (hashdb) option that references root when Update is called.

How this was tested

CI

How is this documented

N/A

eth/state_accessor.go Outdated Show resolved Hide resolved
@darioush darioush marked this pull request as ready for review October 16, 2024 02:50
@darioush darioush requested review from ceyonur and a team as code owners October 16, 2024 02:50
triedb/hashdb/database.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@ceyonur ceyonur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks way better 🚀!

few questions to ensure we're not changing anything in functionality-wise.

core/genesis.go Show resolved Hide resolved
core/blockchain.go Show resolved Hide resolved
ARR4N
ARR4N previously approved these changes Oct 17, 2024
Copy link
Contributor

@ARR4N ARR4N left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the comment in eth/state_accessor.go re where it's set to true before merging. No need for me to re-review though.

eth/state_accessor.go Show resolved Hide resolved
triedb/hashdb/database.go Outdated Show resolved Hide resolved
triedb/hashdb/database.go Outdated Show resolved Hide resolved
Signed-off-by: Darioush Jalali <[email protected]>
triedb/hashdb/database.go Show resolved Hide resolved
@darioush darioush enabled auto-merge (squash) October 18, 2024 15:57
@darioush darioush merged commit ecf5cc9 into master Oct 18, 2024
14 checks passed
@darioush darioush deleted the reference-root-triedb branch October 18, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants